package cc.loach.homekit.hap.controlled.device.loach._lightbulb._light._lightbulb.properties;

import cc.loach.homekit.hap.typedef.accessory.HapCharacteristic;

import java.util.function.Supplier;
import java.util.function.Function;

import cc.loach.xiot.spec.definition.property.Access;
import cc.loach.xiot.spec.definition.property.data.DataFormat;
import cc.loach.xiot.spec.definition.urn.PropertyType;

import io.vertx.core.Future;


/**
 * Property: 开关
 */
public class On extends HapCharacteristic<Boolean> {

    public static final int IID = 11;
    public static final String TYPE = "urn:homekit-spec:property:on:00000025:loach:light:1";

    public On() {
        super(IID, new PropertyType(TYPE), new Access(true, true, true), DataFormat.BOOL);
        
    }

    public On doGet(Supplier<Future<Boolean>> getter) {
        this.getter = getter;
        return this;
    }

    public On doSet(Function<Boolean, Future<Void>> setter) {
        this.setter = setter;
        return this;
    }

}
